﻿using System.Collections.ObjectModel;
using TaskManagerMVVM.DataAccess;

namespace TaskManagerMVVM.ViewModel
{
    public class MainWindowViewModel : ViewModelBase
    {
        
        readonly ProcessRetriever _processRetriever;
        readonly SystemPerformance _systemPerformance;

        ObservableCollection<ViewModelBase> _viewModels;

        public MainWindowViewModel()
        {
           
            _processRetriever = new ProcessRetriever();
            _systemPerformance = new SystemPerformance();

            ProcessListViewModel viewModelProcess = new ProcessListViewModel(_processRetriever, _systemPerformance);

            //EmployeeListViewModel viewModel = new EmployeeListViewModel(_employeeRepository);
            //this.ViewModels.Add(viewModel);
            this.ViewModels.Add(viewModelProcess);

        }

        public ObservableCollection<ViewModelBase> ViewModels
        {
            get
            {
                if (_viewModels == null)
                {
                    _viewModels = new ObservableCollection<ViewModelBase>();

                }
                return _viewModels;
            }
        }

    }
}
